package com.wendy.read.member.annotation;

import com.wendy.read.member.validation.ArticleStateValidation;
//import jakarta.validation.Constraint;
//import jakarta.validation.Payload;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Documented
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {ArticleStateValidation.class})
public @interface ArticleState {
    String message() default "文章状态参数只能是”已发布”或者”草稿”。";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
